<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class UpdateSellersAboutVisit extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('sellers', function (Blueprint $table) {
            //
            $table->integer('last_7_visitors')->default(0)->comment('每天增加的访问量')->change();
            $table->integer('refresh_visitors')->default(0)->comment('刷新增加的访问量');
            $table->integer('order_visitors')->default(0)->comment('下单增加的访问量');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('sellers', function (Blueprint $table) {
            //
            $table->dropColumn('refresh_visitors');
            $table->dropColumn('order_visitors');
        });
    }
}
